﻿// "Therefore those skilled at the unorthodox
// are infinite as heaven and earth,
// inexhaustible as the great rivers.
// When they come to an end,
// they bagin again,
// like the days and months;
// they die and are reborn,
// like the four seasons."
// 
// - Sun Tsu,
// "The Art of War"

using log4net.Util;

namespace Infrastructure.Logging
{
    /// <summary>
    /// Implementation of Stacks collection for the ThreadContext
    /// </summary>
    /// <remarks>
    /// Implementation of Stacks collection for the ThreadContext
    /// </remarks>
    public class ThreadContextStacks
    {
        /// <summary>
        /// create proxy for real stacks collection
        /// </summary>
        /// <param name="stacks">real stacks collection</param>
        public ThreadContextStacks( log4net.Util.ThreadContextStacks stacks )
        {
            mStacks = stacks;
        }

        /// <summary>
        ///             Gets the named thread context stack
        /// </summary>
        /// <value>
        ///             The named stack
        /// </value>
        /// <remarks>
        /// <para>
        ///             Gets the named thread context stack
        /// </para>
        /// </remarks>
        public ThreadContextStack this[ string key ]
        {
            get { return mStacks[key]; }
        }

        /// <summary>
        /// real stack collection
        /// </summary>
        private readonly log4net.Util.ThreadContextStacks mStacks;
    }
}
